package com.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.entity.SmsCoupon;
import com.mall.entity.SmsCouponHistory;
import lombok.Data;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

@Mapper
public interface SmsCouponMapper extends BaseMapper<SmsCoupon> {

    @Select("select * from sms_coupon where to_days(enable_time) = to_days(now()) and count>0")
    List<SmsCoupon> getAbleCoupon();
}
